package com.imoblife.brainwavestus.util;

import com.imoblife.brainwavestus.R;
import com.imoblife.brainwavestus.oldMedia.MediaplayerFactory;

import android.app.Activity;
import android.content.Context;


public class MediaUtil {
	
	
	public static boolean checkPlay(Activity mActivity) {

		try {
			if (new MediaplayerFactory(mActivity).getBackgoundMediaPlayer()
					.isPlaying()) {
				new AlertDialogUtil(mActivity).showAlertDialog(
						mActivity.getResources().getString(
								R.string.alertutil_title),
						mActivity.getResources().getString(
								R.string.alertutil_content_stopmusic),
						mActivity.getResources().getString(
								R.string.alertutil_dismiss));

				return true;
			}
		} catch (Exception e) {
			// TODO: handle exception
		}

		return false;

	}
}
